<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>

<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="${pageContext.request.contextPath}/media/layui/css/layui.css" media="all">
<script type="text/javascript" src="${pageContext.request.contextPath}/media/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/media/layui/layui.js"></script>
</head>
<body>

	<div class="layui-container" style="margin-top: 5px">
		<form class="layui-form" action="${pageContext.request.contextPath}/grade/update" method="post">
		<div class="layui-form-item">
				<label class="layui-form-label">班级序号</label>
				<div class="layui-input-block">
					<input type="text" name="id" readonly="readonly" autocomplete="off"
						class="layui-input" id="f1" value="${grade.id}">
						<input type="hidden" name="count" value="${grade.count}">
						<input type="hidden" name="flag" value="${grade.flag}">
						<input type="hidden" name="del" value="0">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">班级名称</label>
				<div class="layui-input-block">
					<input type="text" name="name" id="f2" lay-verify="name" autocomplete="off"
						placeholder="请输入名称" class="layui-input" value="${grade.name}">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">班级学科</label>
				<div class="layui-input-block">
					<select name="cid" id="cds">
        				<option value="-1">--请选择学科--</option>
        				<c:forEach items="${course}" var="c" varStatus="v">
        				<option value="${c.id}"${c.id==grade.cid?"selected":""}>${c.name}</option>
        				</c:forEach>
      				</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">开班日期</label>
				<div class="layui-input-block">
				 <input type="text" name="createdate" value="${grade.createdate}" readonly="readonly" id="f4" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">班级周期</label>
				<div class="layui-input-block">
					<input type="text" name="week" id="f5" lay-verify="name" autocomplete="off"
						placeholder="请输入周期" class="layui-input" value="${grade.week}">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">班级地址</label>
				<div class="layui-input-block">
					<input type="text" name="location" id="f6" lay-verify="name" autocomplete="off"
						placeholder="请输入地址" class="layui-input" value="${grade.location}">
				</div>
			</div>
			
		
			<div class="layui-form-item">
				<input class="layui-btn"  style="margin-left: 10%"  type="submit" value="确认修改">
			</div>
		</form>
	</div>
	
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>
		layui.use([ 'form', 'laydate' ],
						function() {
							var form = layui.form, layer = layui.layer, laydate = layui.laydate;

		});
	</script>
</body>
</html>